# include <string>
# include <sstream>
# include <vector>
# include <ctype.h>
# include <math.h>
# include <iostream>
using namespace std;

namespace SymbolicMath{
	struct Monomial{
		double coeff;
		int power;
	};
	
	class Poly{
		friend Poly operator+(const Poly & lhs, const Poly & rhs);
		friend Poly operator*(const Poly & lhs, const Poly & rhs);
		friend Poly operator-(const Poly & lhs, const Poly & rhs);
		friend bool operator==(const Poly & lhs, const Poly & rhs);
		friend Poly operator-(const Poly & somePoly);
		friend ostream & operator<< (ostream & out, const Poly & value);
	private:
		vector<Monomial> polynomial;
		Poly(vector<Monomial> polynomial);
	public:
		Poly(double integer);
		Poly();
		Poly(string inputString);
		const Poly & operator+=(const Poly & rhs);
		const Poly & operator-=(const Poly & rhs);
		const Poly & operator*=(const Poly & rhs);
		double operator()(double value);
			
	};
	
	bool operator!=(const Poly & lhs, const Poly & rhs);
	ostream & operator<< (ostream & out, const Poly & value);

}